Real-time nighttime vehicle detection and recognition system based on computer vision

ABSTRACT

The present invention relates to a real time night time vehicle detection and identification system comprising of an illuminant object image segmentation device  1,  an illuminant object classifying device  2,  a vehicle lighting object identification device  3,  a vehicle position determining device  4  and a vehicle tracking device  5.  Under various circumstances of road lighting during nighttime, the system can efficiently and accurately demarcate and identify the lamps of incoming and preceding vehicles and accurately provides the driver with auxiliary information needed to analyze the traffic conditions in front of the vehicle during the conditions met on the road at that time.

CROSS-REFERENCES TO RELATED APPLICATION

The present invention relates to an intelligent real time night time vehicle detection and identification system utilizing computer vision.

BACKGROUND OF THE INVENTION

During the course of night time driving, the driver ought to rely on the illumination of head light to learn about the condition of preceding vehicles, including traffic of incoming vehicle, relative position and distance, perception about the condition of incoming rear vehicles is also the same, it ought to rely on the incoming rear vehicle's head light and its illumination to determine it. Due to diverseness of road condition during night time, an average driver ought to rely on the use of high beam light or low beam light to make a decision, so as to gain road condition messages of varying distances, however, as for example if discovered there is incoming preceding vehicle in within a comparatively short distance, at this moment on similar use of high beam light, phenomenon of interference of incoming vehicle driver happens to occur. Traditional vehicles system, because of its incapability to detect traffic conditions within a certain distance by itself, hence automatic switching from high beam light to low beam light all of a sudden, or switching the other way round, both causes dizziness in drivers of moving vehicle due to sudden illumination of light rays, increasing the fatalness of driving.

On the basis of the need mentioned above, namely, an operating mechanism which can automatically switch high beam low beam lights, for the time being there is already numerous technologies which can accomplish it, wherein vast majority of the systems adopts ultrasound or vehicle radar to accomplish the decision of incoming vehicle distance, however, the cost to deploy such type of equipment is rather high.

As for example as published in Taiwan Patent Publication number 00569981, M250832, 00328413 etcetera, is to set up a blaze sensor in front of the vehicle, the blaze sensor many are mainly photodiode, whose principal mode of operation is to sense the source of blaze in front of the vehicle, herewith, during driving at night time when the intensity of the lamplight illumination in front of the vehicle exceeds a threshold value, the blaze sensor immediately produces a response and decides that there is appearance of vehicle ahead and according to this signal triggers the switching mechanism controlling the high beam light and the low beam light. Nevertheless if photodiode et cetera is used, only can it determine the possibility whether vehicle exists ahead or not in accordance with whether the blaze appears or not, but because it is still unable to differentiate whether the light source is the lighting of a real vehicle or light source of other circumstances, as for example the intense scintillation of shop signs therefore it is likely to bring about phenomenon of erroneous decision.

Moreover, prior arts have disclosed for example U.S. Pat. No. 5,837,994, U.S. Pat. No. 6,861,809, U.S. Pat. No. 6,868,322, et cetera, is to set up light sensor array system in front of the vehicle, while driving at night, additional imaging measurement and additional quantification into light level arrays is done on the viewable area ahead of the vehicle, then using complex number of threshold value decided beforehand, image having light level above a certain threshold value is additionally retrieved and labeled, subsequently another threshold value is used to decide whether it is the light of the preceding vehicle, shining reflection of the light of vehicle's lighting or light source of other circumstances other than that of vehicle's light, anyhow, the relative technologies using light sensor array system, through a series of light level threshold values to differentiate and analyze each bright spot area obtained by imaging through light sensor array, can already drastically reduce the probability of erroneous decision, however, although this technology can determine incoming vehicles approaching ahead or preceding vehicles driving on the same lane, yet it is still unable to further determine and demarcate accurately the relative position and vehicle count of each preceding vehicle and incoming vehicle to gain more definite information traffic conditions ahead. Furthermore, because the technology uses fixed threshold values configured beforehand, it is unable to adaptively adjust the selection of threshold values aimed at different conditions of night time lighting, so when put in use in a circumstance where road condition have different lighting conditions, it is unable to maintain efficiency of absolute unanimity.

SUMMARY OF THE INVENTION

With reference to the issue mentioned above, the present invention has brought up a perspective imaging model through CCD image retrieving technology and computer vision collocation to carry out night time incoming vehicle detection and determination of distance. The decision of the present invention is a high speed computer vision algorithm method, which can drastically reduce and accomplish the prime cost of the operating mechanism, at the same time possesses quite an extent of reliability, it is a solving proposal of high efficiency and low cost.

The present invention of real time night time vehicle detection and identification system, which includes:

An illuminant object image segmentation device for carrying out illuminant object segmentation on the retrieved image of illuminant object; an illuminant object classification device for carrying out classification procedure on the illuminant object which is to be segmented relying on a connected object demarcation unit, so as to carry out a generalization on the characteristics correlation amongst each illuminant object and thus becomes each illuminant object groups; a vehicle lighting object identification device for gaining characteristic information of each vehicle from the illuminant object groups which is to be generalized, relying on a pattern analyzing unit; a vehicle position determining device for gaining position information between each vehicle that appears ahead on the road and the vehicle in concern, from the characteristic information, utilizing a distance estimation unit; and a vehicle tracking device, after gaining the demarcated illuminant object groups from the position information, targeting at the vehicle lighting groups demarcated at each continued image frame, to detect the direction it is heading, so as to decide the movement information of each vehicle that enters the area under surveillance, and correspondingly operates the relative device and equipment.

Wherein the position information at least includes detection of distance of target vehicle from the lane and its relative position et cetera; besides, the movement information at least includes relative direction of motion and relative velocity of each vehicle et cetera; the connected object demarcation unit is used in the demarcation of each illuminant object projection analysis and analyzing and comparing characteristics of object size, ratio and distance.

Wherein the pattern analyzing unit is targeted at the demarcated illuminant object group, to identify whether it has characteristics of vehicle and vehicle lighting, in the process as well identify it out as vehicle head light or vehicle tail lamp. Besides this, the related device and equipment is the switch controller of high beam and low beam of the vehicle's head light, the distance estimation unit as well is based on perspective image modeling, using estimated detection of corresponding distance of depth of field of target vehicle on the imaginary and real coordinate axes system at a particular timeline and using corresponding relation between coordinate position of image element and distance of depth of field of the target vehicle in the image, the relative space position between it and the vehicle in concern on the lane, position of left-hand edge and position of right-hand edge et cetera is derived.

As fore-mentioned, the present invention of real time night time vehicle detection and identification system relies on a CCD video retrieving system installed at the back of the windshield, to accurately detect traffic conditions within the viewable range ahead of the vehicle, to identify vehicle head light of incoming vehicle on the opposing lane and vehicle tail lamp of preceding vehicle on the lane in concern and to determine and demarcate the relative positions and vehicle count of each preceding vehicle and incoming vehicle, so that the driver can be further assisted to determine traffic conditions and thus automatically controls the relative device (as for example switching of high beam and low beam of vehicle's head light).

In addition, the present invention provides a method of real time detection and identification of night time vehicle, which includes the following steps:

Step of illuminant object image segmentation, carrying out illuminant object segmentation on the retrieved image of illuminant object;

Step of illuminant object classification, relying on a connected object demarcation unit, classification procedure is carried out on the illuminant object which is to be segmented, so as to carry out a generalization on the characteristic correlation amongst each illuminant object and thus becomes each illuminant object groups;

Step of vehicle lighting object identification, gaining characteristic information of each vehicle from the said illuminant object groups to be generalized, relying on a pattern analyzing unit;

Step of vehicle position determination, gaining position information between each vehicle that appears ahead on the road and the vehicle in concern from the characteristic information, utilizing a distance estimation unit; and

Step of vehicle tracking, after gaining the demarcated illuminant object groups from the said position information, targeting at the vehicle lighting groups demarcated at each continued image frame, to detect the direction it is heading, so as to decide the movement information of every one vehicle that enters the area under surveillance, and correspondingly operates the relative device and equipment.

As mentioned above the virtue possessed by the system and methods of the present invention includes: efficiently and accurately demarcate and detect the vehicle lighting of incoming vehicle and preceding vehicle on the road at all different conditions of night time road lighting, and accurately provides information to assist the driver in analyzing traffic conditions in front of the vehicle. During the detection and determination of traffic conditions on the preceding lane, when this night time vehicle detection and identification system is applied on the control of high and low beam light then it can automatically adjust the high beam light and the low beam light of the vehicle's head light to the most optimum condition, if vehicles is detected then it is switched to low beam light to prevent the reflection from affecting the drivers of incoming vehicles ahead, it is to prevent distractions caused by dizziness due to illumination of high beam light of incoming vehicle at a short range which can result in dangers of traffic accident; when there is already no vehicles on the lane ahead, then it will send out control signals to switch back to high beam light so as to assist the driver to clearly catch sight of the road conditions on the far side.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS OF THE INVENTION

Further description of the present invention of real time night time vehicle detection and identification system and its method is done with the coordination of diagrams and implementations as follows.

The present invention of real time night time vehicle detection and identification system is provided with the processing devices listed below: an illuminant object image segmentation device 1, an illuminant object classification device 2, a vehicle lighting object identification device 3, a vehicle position determining device 4 and a vehicle tracking device 5, its whole framework of mathematic operations is as shown in FIG. 1, the steps of mathematical calculations of each processing devices described in order is shown below.

First of all, video camera installed at the back of the windshield inside the vehicle shoots at the vehicle's front, during driving at night time, night time road condition images in front of the vehicle is retrieved through a video camera, as shown in FIG. 2, and the image is then delivered to the follow-up processing module for analysis processing.

Subsequently, using illuminant object image segmentation technology additional analysis is done on the image of the road conditions in front of the vehicle. The segmentation technology is based on statistical image analysis to decide the multiple segment threshold values and the brightest object plane is additional retrieved by this high speed image segmentation technology.

As fore-mentioned, the concept of statistics, classification and determination is applied on the aspect of image segmentation technology, originated earliest from the research of N.otsu et cetera (A threshold selection method from gray-level histograms”, IEEE Transactions on System Man and Cybernetics, vol. SMC-8, pp. 62-66, 1978.), which consist in finding a most optimum threshold, the image element of the whole image is divided into two classes, separately representing foreground and background, enabling the (variation quantity between classes) of the image element set of this two classes to be able to reach the highest value.

With regard to the concerned road image of night time, bright object is the main purpose of segmentation analysis. That is why the procedures of multiple threshold automatic image segmentation technology of the present invention as follow:

Step (1) during procedure initialization, the entire image element is generalized into initiatory image element class C₀, let q represent the total of image element class which exist in this present iteration, therefore initial value is 1.

Step (2) When this present iteration begins, q number of image element class is chosen in the preceding iteration. Subsequently, aiming at each image element class C₀, its statistical characteristics, progressive probability function w_(n), mean μ_(n) and standard deviation σ_(n) is calculated.

Step (3) From within the image element class chosen at present, the image element class of highest contribution value in the variation quantity w_(n)σ_(n) ² is looked up from the class, these chosen image element class are represented by C_(p), in the next step these classes will be taken as an object of duality division.

Step (4) Using a most optimum threshold t_(s)*, image element class C_(p) is segmented into two subclasses C_(p0) and C_(p1). C_(p0) and C_(p1) are the subsets that branched out from C_(p), they can be represented as C_(p0): {t_(p)+1, t_(p)+2, . . . t_(s)} and C_(p1): {t_(s)+1, t_(s)+2, . . . ,t_(p+1)}; whereas most optimum threshold t_(s) is derived from the variation quantity between classes v _(BC) as a result of maximization segmentation. Wherein method of acquiring optimized t_(s)* is obtained from the formula shown below:

$\begin{matrix} {{t_{s}^{*} = {{Arg}\; \underset{{t_{p >}t_{s}} > t_{p + 1}}{Max}{v_{BC}^{\prime}\left( t_{s} \right)}}},} & (1) \\ {{v_{BC}^{\prime} = {{w_{p\; 0}\left( {\mu_{p\; 0} - \mu_{p}} \right)}^{2} + {w_{p\; 1}\left( {\mu_{p\; 1} - \mu_{p}} \right)}^{2}}},} & (2) \\ {{w_{p\; 0} = {\sum\limits_{i = {t_{p} + 1}}^{t_{s}}P_{i}}},{w_{p\; 1} = {\sum\limits_{i = {t_{s} + 1}}^{t_{p + 1}}P_{i}}}} & (3) \\ {{\mu_{p\; 0} = {\sum\limits_{i = {t_{p} + 1}}^{t_{s}}{i\; {P_{i}/w_{p\; 0}}}}},{\mu_{p\; 1} = {\overset{t_{p} + 1}{\sum\limits_{t_{s} + 1}}{i\; {P_{i}/w_{p\; 1}}}}}} & (4) \\ {{w_{p} = {\overset{t_{p + 1}}{\sum\limits_{t_{p} + 1}}P_{i}}},{\mu_{p} = {\sum\limits_{i = t_{p + 1}}^{t_{p + 1}}{i\; {P_{i}/w_{p}}}}}} & (5) \end{matrix}$

Wherein w_(p) and μ_(p) are respectively the progressive probability and mean of the image element gray scale with respect to C_(p).

Step (5) after executing the procedure of Step (4), q+1 number of image element class is obtained. Then the formula below:

$\begin{matrix} {{S\; F} = {\frac{v_{BC}(T)}{v_{T}} = {1 - \frac{v_{WC}(T)}{v_{T}}}}} & (6) \end{matrix}$

is used to calculate the differential value of SF degree of dissociation of the segmentation result. If SF<TH_(SF) (TH_(SF) is the default target value, in the present implementation TH_(SF)=0.9), it implies that there still has homogenous object which had not yet been segmented, then it goes back to step (2) to carry out the next iteration procedure, or else, it enters step (6).

Step (6) according to the threshold sets decided finally, the image element of images are separately generalized into the corresponding image element class, in the same way, each homogenous object are separately divided and finishing the segmentation procedure.

Moreover, in the present implementation, 0.9 is used as the configured value of TH_(SF). This optimum value is measured by constant experimentation on a large quantity of multiform photographed images, thus optimized segmentation results can be gained.

Subsequently, taking FIG. 2, execution of illuminant object image segmentation, as an example, the process and result of the present segmentation technology is described, from FIG. 2 it can be seen that in a typical night time road condition, the bright illuminant objects which appears includes vehicle lighting, reflection caused due to projection of the vehicle's lighting on the lane, street lights, lights of traffic signals, neon light et cetera. Relying on the calculation procedures mentioned above, its statistical analysis diagram of the image element is shown in FIG. 3, after executing the above mentioned procedure of image segmentation, a total of three most optimized segmentation thresholds is obtained, so as to divide these image elements into four image element groups, wherein those located on the most right side of the statistical diagram is the brightest image element group, which are composed of illuminant objects in night time road conditions. After using the present automatic segmentation algorithm, four homogenous objects are detected from the real image, image obtained by replacing them with different representing colors is FIG. 4, wherein those that are white are the illuminant objects. FIG. 5 is the binary illuminant object plane, followed up to be processed, the next phase of analysis processing will be aimed towards carrying out analyzing on this illuminant object plane, so that vehicle lighting object could be correctly obtained.

Subsequently, illuminant object classification and demarcation procedure is carried out on the gained image element of the binary illuminant object plane, in this object classification and demarcation procedure, firstly connected object analysis is used, so that further generalization and assembling can be carried out on the correlated characteristics between each night time illuminant object.

With regard to the illuminant object obtained earlier by bright illuminant object segmentation procedure, connected-component labeling must be used to mark-up the neighboring pixels as the same object; the high speed connected-component labeling as applied by the present invention, is the use of a scanning method, all connected-components are labeled on the binary converted image obtained after the segmentation procedure. The present invention mainly adopted high speed connected object labeling algorithm, the scanning direction is from top to bottom and from left to right. Advantages of the scanning method lies in the need of two types of scanning: coarse scanning and refined scanning. In the aspect of coarse scanning, a connected component is probably divided into several parts, and labels of equal value will be added to those still determined as connected component. Then aiming at those labels of equal value, refined scanning is used to decide the final label of the connected-component, subsequently, after recording the sub-area of every connected-component, sub-area assembling analysis as shown below is carried out, so as to carry out the identification of vehicle object.

Denotations of connected-components used in the process of sub-area assembling and vehicle object identification are defined as follows:

-   1. B_(i) is the i^(th) connected-component sub-area labeled by     utilizing a connected-component labeling program; -   2. The top edge, bottom edge, right side and left side are     separately represented by t(B_(i)), b(B_(i)), r(B_(i)), l(B_(i))     respectively; -   3. The width and height of the connected-component sub-area, Bi is     separately represented by W(B_(i)) and H(B_(i)) respectively; -   4. The shortest distance of the horizontal on the perpendicular of     the sub-area of two connected-components B_(i) and B_(j) are     separately calculated utilizing the following formula;     -   Horizontal distance measurement:

D _(h)(B _(i) ,B _(j))=max[l(B _(i)),l(B _(j))]−min[r(B _(i)),r(B _(j))]  (14)

-   -   Perpendicular distance measurement:

D _(v)(B _(i) ,B _(j))=max[t(B _(i)),t(B _(j))]−min[b(B _(i)),b(B _(j))]  (15)

-   5. The overlapping ratio of the perpendicular projection of the     sub-area of two connected-components can be gained utilizing the     following formula:

P _(v)(B _(i) ,B _(j))=−D _(v)(B _(i) ,B _(j))/min [H(B _(i)),H(B _(j))]  (16)

Due to illuminant object plane gained from previous bight object retrieving procedure, the illuminant body of non vehicle lighting object (as for example, streetlights, traffic lights, neon lights et cetera) is usually located at a point higher than the line of sight ahead. In order to eliminate the illuminant body of non vehicle lighting in advance, so as to speed up the processing speed, an imaginary horizon line is set up as shown in FIG. 6. The imaginary horizontal line is configured to one third of the retrieved image area, this line approximately coincides with the horizon line extending afar, the illuminant object below this line, if determined to be positioned on the road is mostly certain to be vehicle lighting, hence the processing efficiency is drastically increased.

After gaining the characteristic information of the connected-components of all illuminant objects, following is the use of an object assembling procedure, where the gained pairs of the bright object possessing similar characteristics is additionally assembled so as to find out the vehicle lighting in the process.

This procedure will search in all sub-area, utilizing several rules of determination, connected object sub-area in pairs are determined, to whether it possesses characteristic arrangement that conforms with that of vehicle lighting, if it is vehicle lighting, then it is in horizontal leveling arrangement and of similar size. If it conforms to the conditions above, then two connected object sub-area are generalized into one group.

-   1. The horizontal distance of two neighboring illuminant object must     lie within a reasonable range:

D _(h)(B _(k1) ,B _(k2))<1.5×max(H(B _(k1)),(B _(k2)))  (17)

-   2. The perpendicular projection overlap ratio of two neighboring     illuminant object with the following condition, so as to determine     whether the two illuminant object possesses characteristics of     horizontal leveling:

P _(v)(B₁,B₂)>0.8  (18)

-   3. The height of two illuminant object must be similar:

H(B _(s))/H(B _(l))>0.7  (19)

If connected object conforms with the above conditions (17)˜(19), thereupon, in order the object sub-area are merged into a sub-area group, representing that it is a group, an illuminant object group that possesses similar characteristics. This object assembling procedure is as shown in FIG. 7, observing its result of assembling, it can be seen that the opposing incoming vehicle lighting on the left is generalized into the same group, while preceding vehicle on the same lane on the right is assembled into another object group.

After completing vehicle lighting assembling procedure, illuminant object groups can be gained, the next objective is to apply vehicle lighting object identification and positioning procedure, from these object groups, to determine whether it possesses characteristics of vehicle lighting and in the process identify it as vehicle head light or as vehicle tail lamp.

For determining whether it conforms to the characteristics of vehicle lighting and identify it as vehicle head light or as vehicle tail lamp, the rule of determination below can be used:

-   -   1. Its width to height ratio conforms to the condition of         W/H≧2.0, vehicle lighting is on the two sides of the vehicle's         front, its shape will take on a rectangular state, hence its         width to height ratio can be utilized, thereupon it can be         determined whether this object possesses rectangular         characteristics or not.     -   2. Depth of field-Area determining table (Z-A Table), with         regard to every objects, to determine whether the correspondent         of its width and distance of depth of field conforms to the         determining standards as defined by the depth of field-area         determining table, this determining table uses statistical         manner of table creation, when the depth of field is some         amount, its corresponding relative reasonable range of the         vehicle's frontage projection area, this method can be utilized         to determine whether the object is vehicle lighting or not.     -   3. For the sake of differentiating it as vehicle head light of         incoming vehicle on the opposite lane or vehicle tail lamp of         preceding vehicle on the same lane so as to gain the direction         of motion of incoming vehicle, then with the characteristic that         vehicle tail lamps are mostly red lights, determination is done.         Hence if the light object group conforms to the condition below         then it is determined as vehicle tail lamp object.

R _(a)−8>both G _(a) and B _(a),  (20)

R_(a), G_(a), B_(a) in the above expression separately represents the average value of red R, green G and blue B of the lighting object image-element.

After obtaining each vehicle position represented by vehicle lighting group, on the basis of its approximate y coordinate height location of the vehicle body on the image, applying a distance estimation rule with perspective image modeling as base, to carry out vehicle real space distance and position determining procedure, so as to gain estimation of its corresponding Z-distance of the coordinate system on imaginary and real world.

Wherein, image grabbed by CCD video camera corresponding on imaginary real world coordinate system is located in the center position of the imaging through camera lens. While the X coordinate axes and Y coordinate axes of the imaginary real world coordinate system corresponds horizontally on the retrieved image's x and y coordinates of the CCD video camera imaging and the Z axes of Z distance is perpendicular to the plane formed by X axes and Y axes. When a vehicle on the lane is located at a distance of Z meters ahead of the vehicle in concern, its position will correspond and project on the Y axes of the imaging of CCD video camera photographed image. Hence, a distance estimation model based on perspective image modeling can be applied, so as to convert and calculate the Y axes position of the vehicle in the image which is to be detected, into the Z-distance of the distance of separation of the vehicle and the vehicle in concern. The conversion operation model is as shown in the expression below:

$\begin{matrix} {Z = {k \cdot \frac{f \cdot H}{y}}} & (21) \end{matrix}$

Wherein, parameter k is a conversion coefficient, used in the conversion of pixel's unit into corresponding millimeters, so as to convert the image plane coordinate axes gained by CCD into the corresponding focal length of imaging on the CCD camera lens; and parameter h is the height from ground of the position of CCD video camera installation, parameter f is the focal length of CCD camera lens.

And the real vehicle body width W of the detected target vehicle, by way of perspective imaging principle using the above mentioned Z-distance value, can be additionally converted and calculated. Let the pixel width that appeared in the image, of the detected target vehicle at time t be represented by w(t), then its corresponding relation by way of perspective image principle and Z-distance, Z(t) at that time is as shown in the expression below:

$\begin{matrix} {\frac{W}{w(t)} = \frac{Z(t)}{k \cdot f}} & (22) \\ {{w(t)} = {k \cdot \frac{f \cdot w}{Z(t)}}} & (23) \end{matrix}$

Wherein, vehicle pixel width w(t)=x_(r)(t)−x_(l)(t), x_(l)(t) and x_(r)(t) are separately the location of the pixel coordinates at time t of the preceding detected target vehicle's left hand edge (vehicle lighting at left hand edge) and right hand edge (vehicle lighting at right hand edge) in the image. Hence, at some length of time Δt=t₁−t₀, the relative motion velocity v of the vehicle in concern and a detected target vehicle in front can be gained by way of derivation operation below:

$\begin{matrix} \begin{matrix} {v = \frac{\Delta \; Z}{\Delta \; t}} \\ {= \frac{{Z\left( t_{1} \right)} - {Z\left( t_{0} \right)}}{t_{1} - t_{0}}} \\ {= \frac{\frac{k \cdot f \cdot W}{w\left( t_{1} \right)} - \frac{k \cdot f \cdot W}{w\left( t_{0} \right)}}{t_{1} - t_{0}}} \\ {= \frac{k \cdot f \cdot W \cdot \frac{{w\left( t_{0} \right)} - {w\left( t_{1} \right)}}{{w\left( t_{0} \right)} \cdot {w\left( t_{1} \right)}}}{t_{1} - t_{0}}} \\ {= \frac{{Z\left( t_{0} \right)} \cdot \frac{{w\left( t_{0} \right)} - {w\left( t_{1} \right)}}{w\left( t_{1} \right)}}{\Delta \; t}} \end{matrix} & (24) \end{matrix}$

Hence, if desired to compute the relative velocity v between the vehicle in concern and the detected target vehicle in front, it can be gained by way of the product relationship of the Z-distance, Z(t₀) detected at a certain point of time t₀ and the rate of change w(t₀)−w(t₁)/w(t₁) of width w of the detected target vehicle in front.

By way of perspective principle operations, from the corresponding relationship between the pixel's coordinate location x_(l)(t) and x_(r)(t) (as shown in FIG. 8) of the preceding detected target vehicle's left hand edge and right hand edge in the image and Z-distance Z(t), the real relative lateral positions X_(l)(t) and X_(r)(t) between it and the vehicle in concern on the lane can be additionally derived and calculated. Suppose at time t, a certain position X(t) is at a distance Z(t) meters from the vehicle in concern on the lane, its corresponding relative position X(t) of the pixel coordinates in the image will have the corresponding conversion relationship:

$\begin{matrix} {\frac{X(t)}{x(t)} = \frac{Z(t)}{k \cdot f}} & (25) \\ {{X(t)} = \frac{{x(t)} \cdot {Z(t)}}{k \cdot f}} & (26) \end{matrix}$

By the above mentioned mathematical equations it can be learned that the left hand edge, X_(l)(t) and right hand edge, X_(r)(t) of the preceding detected target vehicle can be separately calculated as shown below:

$\begin{matrix} {{X_{l}(t)} = {{\frac{{x_{l}(t)} \cdot {Z(t)}}{k \cdot f}\mspace{14mu} {and}\mspace{14mu} {X_{r}(t)}} = \frac{{x_{r}(t)} \cdot {Z(t)}}{k \cdot f}}} & (27) \end{matrix}$

By way of the above mentioned mathematical equations, the information about distance, relative velocity and relative lateral positions et cetera between the vehicle in concern and the preceding detected target vehicle on the lane can be gained, this way the driver can be assisted in learning about the information of relative positions and motion between the vehicle in concern and the preceding vehicle so as to adopt the correct corresponding operations and prevent night time vehicle accidents from happening, more further application of this detection information is to use it as an automated control mechanism of vehicle cruise velocity and driving route, so as to increase the safety of night time driving.

After gaining the demarcated vehicle lighting object groups in each continuous image frame, vehicle lighting positioning and tracking procedure can be applied, aimed at the vehicle lighting object groups demarcated in each continuous image frames, with regard to the direction they are advancing, to track and detect so as to accurately determine the information of moving direction, position and relative velocity et cetera of every vehicle entering the area under surveillance, in this way the driver can be more perfectly assisted to determine the traffic conditions ahead of the vehicle.

With regard to the vehicle lighting object groups appearing at a length, demarcated in the video, they respectively represent incoming vehicles on the opposite lane and preceding vehicles on the same lane appearing on the preceding lane of the vehicle in concern, after conducting the above mentioned procedure of real vehicle distance and position determination to calculate and determine the relative space positions (Z-distance Z(t), position of left hand edge X_(l)(t) and position of right hand edge X_(r)(t)) of it on the real lane, the trajectory motion of the vehicle is analyzed and looked for in a series of images, until the vehicle disappears in the line of sight ahead of the vehicle in concern. When a target vehicle i at time t (t^(th) frame of the video image) appears at the preceding space position in front of the vehicle is represented by P_(i) ^(t) and defined as:

P _(i) ^(t)=(X _(i)(t),Z _(i)(t))  (28)

Wherein X_(i)(t) represents the horizontal midpoint position of the target vehicle i at time t appearing on the lane, it can be obtained through the mathematical operation given below:

(X_(l)(t)+X_(r)(t))/2  (29)

Subsequently, adopting smallest path coherence function algorithm, to calculate and gain the motion trajectory of each vehicle appearing in each image frame and on this account to calculate the information of relative direction of motion, relative position, relative velocity et cetera of each vehicle appearing in front of the vehicle in concern at each point of time.

Firstly, T_(i) is used to represent the tracking trajectory vector of vehicle i, the vector represents that in the space of line of sight in front of the vehicle in concern, the trajectory motion formed by space position of the whereabouts in order of the vehicle i in a continuous time sequence 0-t (0^(th) to t^(th) image), it is defined as:

T_(i)=<P_(i) ⁰, P_(i) ¹, . . . ,p P_(i) ^(t), . . . , P_(i) ^(n)>  (30)

Subsequently, let d_(i) ^(t) represents the path deviation quantity of vehicle i at t^(th) image in time, which is:

d _(i) ^(t)=φ(P _(i) ^(t−1) ,P _(i) ^(t) ,P _(i) ^(t+1))=φ( P _(i) ^(t−1) P _(i) ^(t) , P _(i) ^(t) P _(i) ^(t+1) )  (31)

Wherein function φ is the path coherence function and vector P_(i) ^(t−1)P_(i) ^(t) represents the position change vector of vehicle i's motion from P_(i) ^(t−1) to P_(i) ^(t). The path coherence function φ can be gained by calculations from the relationship formula between motion vectors P_(i) ^(t−1)P_(i) ^(t) and P_(i) ^(t)P_(i) ^(t+1) , the path coherence function φ has two main components, the former term represents the deviation of motion direction formed by P_(i) ^(t−1)P_(i) ^(t) and P_(i) ^(t)P_(i) ^(t+1) , the latter term represents its change in velocity of motion, the concept is based mainly on the preservation of a definite smoothness by the motion trajectory, hence its direction of motion and velocity of motion should react a definite standard of smoothness, for this reason the relationship operating formula below is formed:

$\begin{matrix} \begin{matrix} {{\varphi \left( {P_{i}^{t - 1},P_{i}^{t},P_{i}^{t + 1}} \right)} = {{w_{1}\left( {1 - {\cos \; \theta}} \right)} +}} \\ {{w_{2}\left\lbrack {1 - {2\left( \frac{\sqrt{{d\left( {P_{i}^{t - 1},P_{i}^{t}} \right)} \cdot {d\left( {P_{i}^{t},P_{i}^{t + 1}} \right)}}}{{d\left( {P_{i}^{t - 1},P_{i}^{t}} \right)} \cdot {d\left( {P_{i}^{t},P_{i}^{t + 1}} \right)}} \right)}} \right\rbrack}} \\ {= {{w_{1}\left( {1 - \frac{\overset{\_}{P_{i}^{t - 1}P_{i}^{t}}\bullet \; \overset{\_}{P_{i}^{t}P_{i}^{t + 1}}}{{\overset{\_}{P_{i}^{t - 1}P_{i}^{t}}} \cdot {\overset{\_}{P_{i}^{t},P_{i}^{t + 1}}}}} \right)} +}} \\ {{w_{2}\left\lbrack {1 - {2\left( \frac{\sqrt{{\overset{\_}{P_{i}^{t - 1}P_{i}^{t}}} \cdot {\overset{\_}{P_{i}^{t},P_{i}^{t + 1}}}}}{{\overset{\_}{P_{i}^{t - 1}P_{i}^{t}}} + {\overset{\_}{P_{i}^{t},P_{i}^{t + 1}}}} \right)}} \right\rbrack}} \end{matrix} & (32) \end{matrix}$

Hence, the path deviation of vehicle i corresponding to its motion trajectory vector defined as D_(i)(T_(i)), can be calculated and gained by the expression below:

$\begin{matrix} {{D_{i}\left( T_{i} \right)} = {\sum\limits_{t = 2}^{n - 1}d_{i}^{t}}} & (33) \end{matrix}$

Going a step further, when m number of vehicles appears within the video image in a length of time, the overall trajectory deviation D of the motion trajectory vector of these m number of vehicles can be gained from the calculations below:

$\begin{matrix} {D = {\sum\limits_{i = 1}^{m}D_{i}}} & (34) \end{matrix}$

On the basis of the calculation method of overall trajectory deviation D defined above, through finding a minimal value of overall trajectory deviation, to gain the most optimized multiple vehicle tracking trajectory and then correctly gain the information of relative direction of motion, relative position, relative velocity et cetera of each vehicle appearing ahead of the vehicle in concern.

Through the CCD image retrieving equipment, the gained traffic image in front of the vehicle, after passing through analysis processing, detects and gains the vehicle head light of the opposing incoming vehicle and preceding vehicle on the same lane and the vehicle tail lamp of the preceding vehicle on the same lane appearing in the line of sight in front of the experimenting vehicle, then additional analysis is performed on them separately, to identify its driving direction, track its driving in the image and to detect the relative distance between it and the vehicle in concern, its result of the processing is as shown separately in FIG. 10, FIG. 11 and FIG. 12.

From the example of the experiment shown by FIG. 10 it is knowable that an incoming vehicle on the opposite lane on the left is constantly approaching nearer. Even though in the scenario there still are some noise illuminants of non vehicle lighting, the pair of vehicle headlight of the vehicle can still be correctly detected. At the point of time, the distance between the vehicle and the vehicle in concern, after passing through the systems distance measurement has a result of 21 meters, this result of distance measurement is considerably close the actual result gained by manual distance measurement.

FIG. 11 represents the experimental result gained by the present system under the condition of vehicles on the same lane and incoming lane both appearing at the same time. From this example of experiment it can be seen that, the paired vehicle headlight of the incoming vehicle on the left and the paired vehicle tail lamp of the preceding vehicle on the same lane right in front, are additionally demarcated and retrieved correctly and evenly, moreover, separately determine as incoming vehicles in the process of approaching nearer and preceding vehicle on the same lane. While the relative distance between other vehicles and the vehicle in concern are separately measured as 9 meters (incoming vehicle) and 11 meters (preceding vehicle). The test example of FIG. 12 demonstrated a more difficult detection scenario in this test image the vehicle headlights of two vehicles are considerably close and are nearby the location of incoming vehicles on the right, there is a cascade of display light illuminations of the park's manufacturers appearing at the same time, moreover, on the upside of the preceding ante-type vehicle there is a cascade of streetlights appearing at the same time, drastically increasing the difficulty of identification. But even though under the conditions of many illuminant objects disturbing detections, the system still can correctly identify separately the vehicle headlight and vehicle tail lamp of this two vehicles, and determine them separately as incoming opposing vehicle or preceding vehicle in front. The distance of these two vehicles, after passing through the present system's distance measurement has a result of 23 meters (incoming vehicle) and 10 meters (preceding vehicle) separately, away from the vehicle in concern.

The identification system of the present implementation is on a Pentium IV 2.4 GHz and 512 MB memory platform, and resolution of video image gained by CCD image retrieving device is 720×480, with regard to every frame of road condition images, retrieved and input by CCD, the present system on the average only needs a processing time of 16 milliseconds. Hence, with this fast speed of processing time, it can satisfy the need of 30 frames per second image input of the instant video processing. While its operation quantity is still under uninterrupted condition, automatic driving and road conditions surveillance functions can be further integrated, as for example supplementary functions like automatic steering wheel control mechanism, instant video compressing et cetera, and then become a set of more complete driver assisting system.

Even though the present invention has already provided descriptions targeting at better implementations, but the implementations are only depictions and are not limited to this, as for example it can be used in tunnels or rainy days under such road conditions where line of sight is not good and requires the use of vehicle lighting to carry out distance determination. Personages of the level familiar in the present type of technology will comprehend that, various revisions and changes can be carried out without swaying from the present invention's content and spirit bounded by the claims filed under the present invention.

REFERENCES

-   1. Taiwan Patent Number 00569981 [Vehicle high and low beam light     automatic switching device] -   2. Taiwan Patent Number M250832 [Vehicle lighting control device     possessing dizziness prevention function] -   3. Taiwan Patent Number 00328413 [Controller device possessing light     detector used in vehicle lighting automatic on/off switching] -   4. U.S. Pat. No. 5,837,994 [Control system to automatically dim     vehicle head lamps] -   5. U.S. Pat. No. 6,861,809 [Headlamp control to prevent glare] -   6. U.S. Pat. No. 6,868,322 [Image processing system to control     vehicle headlamps or other vehicle equipment]

BRIEF DESCRIPTION OF THE DRAWING

FIG. 1 represents the framework of the overall processing operations.

FIG. 2 is the original example diagram of real vehicle lane.

FIG. 3 represents the statistical curve and the result of implementation of recursion image segmentation of the original vehicle lane diagram.

FIG. 4 represents the image replaced with representing colors after execution of automatic segmentation algorithm.

FIG. 5 is the representing diagram of the illuminant object plane after binary conversion.

FIG. 6 is the representing diagram of the connected-components of illuminant objects in the processing zone configured under imaginary horizon line.

FIG. 7 is the intimation diagram of vehicle lighting object assembling procedure

FIG. 8 is the intimation diagram of the coordinates of the vehicle body in horizontal position.

FIG. 9 is the CCD image retrieving device installed in the experiment vehicle at the back of the windshield.

FIG. 10 is the experiment result of test example 1.

FIG. 11 is the experiment result of test example 2.

FIG. 12 is the experiment result of test example 3.

DESCRIPTION OF MAIN COMPONENT SYMBOLS

-   1 Illuminant object image segmentation device. -   2 Illuminant object classification device. -   3 Vehicle lighting identification device. -   4 Vehicle position determining device. -   5 Vehicle tracking device. 

1. A system for real time night time vehicle detection and identification, which includes: An illuminant object image segmentation device, for carrying out illuminant object segmentation on the retrieved image of illuminant object; An illuminant object classification device, relying on a connected object demarcation unit, classification procedure is carried out on the illuminant object which is to be segmented, so as to carry out a generalization on the characteristics correlation amongst each illuminant object and thus becomes each illuminant object groups; A vehicle lighting object identification device, for gaining characteristic information of each vehicle from the illuminant object groups, which is to be generalized, relying on a pattern analyzing unit; A vehicle position determining device, for gaining position information between each vehicle that appears ahead on the road and the vehicle in concern from the characteristic information, utilizing a distance estimation unit; and A vehicle tracking device, after gaining the demarcated illuminant object groups from the position information, targeting at the vehicle lighting groups demarcated at each continued image frame, to detect the direction it is heading, so as to decide the movement information of each vehicle that enters the area under surveillance, and correspondingly operates the relative device and equipment.
 2. According to the system of claim 1 wherein the position information includes detection of distance of target vehicle from the lane and its relative positions et cetera.
 3. According to the system of claim 1 wherein the movement information includes corresponding direction of motion and relative velocity of each vehicles et cetera.
 4. According to the system of claim 1 wherein it further includes an automatic control mechanism, using the position information and the movement information, to adopt a correct corresponding operation on vehicle cruise velocity and drive route.
 5. According to the system of claim 1 wherein the connected object demarcation unit is used in the demarcation of each illuminant object and analyzing and comparing the characteristics of projection analysis, object size, ratio, and distance.
 6. According to the system of claim 1 wherein the pattern analyzing unit is targeted at the demarcated illuminant object group, to identify whether it has characteristics of vehicle and vehicle lighting, in the process as well identit˜y it out as vehicle head light or vehicle tail lamp.
 7. According to the system of claim 1 wherein the distance estimation unit is based on perspective image modeling, using estimated detection of corresponding distance of depth of field of target vehicle on the imaginary and real coordinate axes system at a particular timeline, and using the corresponding relation between coordinate position of image element and distance of depth of field of the target vehicle in the image, to derive the relative space position between it and the vehicle in concern on the lane.
 8. According to the real time night time vehicle detection and identification system of claim number 7 wherein the relative space position includes distance of depth of field, position of left-hand edge and position of right-hand edge et cetera.
 9. According to the real time night time vehicle detection and identification system of claim number 1 wherein the related device and equipment is the switch controller of high beam and low beam of the vehicle's head light.
 10. A method of real time detection and identification of night time vehicle includes: Step of illuminant object image segmentation, carrying out illuminant object segmentation on the retrieved image of illuminant object; Step of Illuminant object classification, relying on a connected object demarcation unit, classification procedure is carried out on the illuminant object which is to be segmented, so as to carry out a generalization on the characteristics correlation amongst each illuminant object and thus becomes each illuminant object groups; Step of vehicle lighting object identification, gaining characteristic information of each vehicle from the illuminant object groups to be generalized, relying on a pattern analyzing unit; Step of vehicle position determination, gaining position information between each vehicle that appears ahead on the road and the vehicle in concern from the characteristic information, utilizing a distance estimation unit; and Step of vehicle tracking, after gaining the demarcated illuminant object groups from the position information, targeting at the vehicle lighting groups demarcated at each continued image frame, to detect the direction it is heading, so as to decide the movement information of every one vehicle that enters the area under surveillance, and correspondingly operates the relative device and equipment.
 11. According to the method of claim 10 wherein the position information includes detection of distance of target vehicle from the lane and its corresponding positions et cetera.
 12. According to the method of claim 10 wherein the movement information includes corresponding direction of motion and corresponding velocity of various vehicles et cetera.
 13. According to the method of claim 10 wherein it further includes an automatic control mechanism, permitting the use of the position information and the movement information, to adopt a correct corresponding operation on vehicle cruise velocity and drive route.
 14. According to the method of real time detection and identification of night time vehicle of claim number 10 wherein the connected object demarcation unit is used in the demarcation of each illuminant object projection and analyzing and comparing the characteristics of projection analysis, object size, ratio, and distance.
 15. According to the method of claim 10 wherein the related device and equipment is the switch controller of high beam and low beam of the vehicle's head light.
 16. According to the method of claim 10 wherein the distance estimation unit is based on perspective image modeling, using estimated detection of corresponding distance of depth of field of target vehicle on the imaginary and real coordinate axes system at a particular timeline, and using the corresponding relation between coordinate position of image element and distance of depth of field of the target vehicle in the image, to derive the relative space position between it and the vehicle in concern on the lane.
 17. According to the method of claim 10 wherein the relative space position includes distance of depth of field, position of left-hand edge and position of right-hand edge et cetera.
 18. According to the method of claim 10 wherein the pattern analyzing unit is targeted at the demarcated illuminant object group, to identify whether it has characteristics of vehicle and vehicle lighting, in the process as well identify it out as vehicle head light or vehicle tail lamp. 